<?
@ session_start();
@ini_set('display_errors', 'on');
include_once("class.lib/db.class.php");
include_once("class.lib/user.class.php");
include_once("class.lib/diplome.class.php");
include_once("class.lib/cours.class.php");
include_once("class.lib/domaine.class.php");
include_once("class.lib/mention.class.php");
include_once("class.lib/aa_niveau.class.php");
include_once("class.lib/aa_projet.class.php");

$cin=$_SESSION["cin"];
if($cin=="") { header("Location: ../index.php");   }

$unite = new Projet();
$details_unite = $unite->getProjetIndexation($_GET['id_ue']);





?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Soumisison du cours</title>



<script language="JavaScript">
//PLF-http://www.jejavascript.net/
function OuvrirPop(url,nom,haut,Gauche,largeur,hauteur,options) {
ouvpop=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}
</script>
<script type="text/javascript" src="javascript.js"></script>
<link href="presse.css" rel="stylesheet" type="text/css" />

<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous/src/effects.js" type="text/javascript"></script>
<script type="text/javascript" src="fabtabulous.js"></script>
<script type="text/javascript" src="validation.js"></script>
</head>
<body >
<?php

if($details_unite)
{
while (list($clef,$valeur2)=each($details_unite))
{  

	$discipline           = $valeur2["discipline"];
 $contexte      	 = $valeur2["description"];
 $objectif       = $valeur2["objectif"];
 $cause      	 = $valeur2["cause"];
 $depense      	 = $valeur2["depense"];
 $depense_etablissement      	 = $valeur2["depense_etablissement"];
 
 $public_cible   = $valeur2[6];
 
 
 
 $prerequis      = $valeur2[8];
 $mot_cles       = $valeur2[4];



?>
	<table align="center">
	 <tr align="center"><td><img src="images/diploma.png"  width="72" height="72" /></td>
	 <td align="right"><H1><font color="DD0269">MODIFICATION DE DESCRIPTION DE LA FORMATION PROJETEE (Suite)</font></H1><br/></td>
	 </tr>
	</table>
	
<table width="90" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr> 
   
    <!--<td><a href="modif_cours.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape1_off.jpg"   width="90" height="20" border="0"/></a></td>-->
	 <td><a href="modif_index.php?id_ue=<? echo $_GET['id_ue'];?>"><img src="images/etape1_off.jpg" width="90" height="20" border="0"/></a></td>
	<td><img src="images/etape2_on.jpg"	 width="90" height="20" border="0"/></td>
   <!-- <td><a href="coconcepteur.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape2_off.jpg"  width="90" height="20" border="0"/></a></td>-->
	<td><td><a href="modif_partenaire.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape3_off.jpg"	 width="90" height="20" border="0"/></a></td>
    <td><a href="modif_equipe.php?id_ue=<? echo $_GET['id_ue'];?>"><img src="images/etape4_off.jpg" width="90" height="20" border="0"/></a></td>
  </tr>
</table>
<u>
<H1>&nbsp; </H1>
</u> 
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" >
    <tr> 
      <td align="left"> <p><strong><font color="DD0269">NB</font></strong>: Veuillez 
        v&eacute;rifier toutes les informations avant de valider le formulaire.<br />
      </p>
      </td>
    </tr>
    <tr> 
      
    <td align="left">&nbsp; </td>
    </tr>
    <tr>
      <td> 
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="left"> 
          <td height="0" valign="top"><em><font color="#277BB0"><strong> </strong></font></em> 

        <form name="cours" id="cours" method="post" action="" >
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                
				
				<tr align="left"> 
                  <td colspan="3"> 
				   <img src="images/Edit.png" />
				  <strong><img src="images/navi_arerow.gif" width="6" height="21" align="absmiddle" />Modification:</strong>
				  </td>
                </tr>
                <tr valign="top" bgcolor="#345491"> 
                  <td colspan="3"><img src="images/gif/pix.gif" width="1" height="1"></td>
                </tr> 
				
				<tr align="left"> 
				
				   <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("public.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span> Public cible: </td>
                  <td height="25" width="5">:</td>
				  
	
                  <td height="0">
		
				  <textarea  cols="43" rows="2"  name="public_cible" type="text" id="public_cible"  class="required" title="Veuillez entrer le public cible SVP!!" ><? echo $public_cible; ?></textarea>
				  </td>
                </tr>
				
				<tr align="left"> 
                <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("objectif.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span>  Objectifs de la formation </td>
                  <td width="5" height="0">&nbsp;</td>
                  <td height="0"><textarea name="objectif" cols="43" rows="2" id="objectif" class="resume" ><? echo $objectif; ?></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Profil du m&eacute;tier vis&eacute; par la formation :</td>
                  <td height="25">:</td>
                  <td height="25" class="required_info"><textarea name="discipline" cols="43" rows="2" id="discipline" class="required" title="Veuillez entrer le profil vis&eacute; SVP!!"><? echo $discipline; ?></textarea></td>
                </tr>
				
				  <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("contexte.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span> Contexte du projet</td>
                  <td height="25">:</td>
                  <td height="25" class="required_info"><textarea name="description" cols="43" rows="2" id="description" class="required" title="Veuillez entrer le contexte SVP!!"><? echo $contexte; ?></textarea></td>
                </tr>
				
				 <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("pourquoi.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span>Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &acute; distance ?</td>
                  <td height="25">:</td>
                  <td height="25" ><textarea name="cause" cols="43" rows="2" id="cause"  title="Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &acute; distance ?"><? echo $cause; ?></textarea></td>
                </tr>
				
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>
				  Cette formation, est-elle dispens&eacute;e en pr&eacute;sentiel dans votre &eacute;tablissement ou dans d'autres &eacute;tablissements universitaires? </td>
                  <td height="25">:</td>
                  <td height="25" >
					<div>Oui<input type="radio" class="inforadio" id="oui" name="depense" value="1" label="Oui" onclick="$('depense_etablissementv').show()" <?php if($depense=='1') echo "CHECKED";?> />
					<span id="depense_etablissementv" <?php if($depense=='0') echo 'style="display:none";'; else echo ' style="" ';?> >
						Si Oui pr&eacute;cisez l'intitul&eacute; et l'&eacute;tablissement  habilit&eacute; 
						<textarea id="depense_etablissement" rows="2" cols="43" name="depense_etablissement" value="" ><?php echo $depense_etablissement; ?></textarea>
						</span>
					</div>
					<div> Non<input type="radio" id="non"  class="inforadio"  name="depense" value="0" label="Non" onclick="$('depense_etablissementv').hide()" <?php if($depense=='0') echo "CHECKED";?>/></div>
				  </td>
				  
                </tr>
				
				
				
				
				
				
               
                <tr align="left"> 
                  <td height="25">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25">
                  <input name="modif_unite" type="hidden" id="modif_unite" value="OK" />
				  <input name="id_ue" type="hidden" id="id_ue" value="<? echo $_GET['id_ue']; ?>" />

                  </td>
                </tr>
                <tr> 
                  <td height="25" align="left">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25" align="left"> <input type="reset" name="Submit22" value="R&eacute;tablir" class="button" /> 
                    <input type="submit" name="Submit3" value="valider" class="button" />
					
					
					                  </td>
                </tr>
              </table>
            </form>
       <script type="text/javascript">
		 var valid2 = new Validation('cours', {useTitles:true});
	  </script>
      </td>
    </tr>
    <tr>
	
      
    <td align="left">&nbsp;</td>
    </tr>
  </table>
  </td>
    </tr>
</table>
<!--/td></tr>
</table-->

<p> 
  <? }

}
 else
{
?>

<table align="center">
	 <tr align="center"><td><img src="images/diploma.png"  width="72" height="72" /></td>
	 <td align="right"><H1><font color="DD0269">MODIFICATION DE DESCRIPTION DE LA FORMATION PROJETEE (Suite)</font></H1><br/></td>
	 </tr>
	</table>
	
<table width="90" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr> 
   
    <!--<td><a href="modif_cours.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape1_off.jpg"   width="90" height="20" border="0"/></a></td>-->
	<td><img src="images/etape2_on.jpg"	 width="90" height="20" border="0"/></td>
   <!-- <td><a href="coconcepteur.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape2_off.jpg"  width="90" height="20" border="0"/></a></td>-->
	<td><td><a href="modif_partenaire.php?id_ue=<?     echo $_GET['id_ue'];?>"><img src="images/etape3_off.jpg"	 width="90" height="20" border="0"/></a></td>
    <td><a href="modif_equipe.php?id_ue=<? echo $_GET['id_ue'];?>"><img src="images/etape4_off.jpg" width="90" height="20" border="0"/></a></td>
  </tr>
</table>



<u>
<H1>&nbsp; </H1>
</u> 
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" >
    <tr> 
      <td align="left"> <p><strong><font color="DD0269">NB</font></strong>: Veuillez 
        v&eacute;rifier toutes les informations avant de valider le formulaire.<br />
      </p>
      </td>
    </tr>
    <tr> 
      
    <td align="left">&nbsp; </td>
    </tr>
    <tr>
      <td> 
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="left"> 
          <td height="0" valign="top"><em><font color="#277BB0"><strong> </strong></font></em> 

        <form name="cours" id="cours" method="post" action="" >
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                
				
				<tr align="left"> 
                  <td colspan="3"> 
				   <img src="images/Edit.png" />
				  <strong><img src="images/navi_arerow.gif" width="6" height="21" align="absmiddle" />Modification:</strong>
				  </td>
                </tr>
                <tr valign="top" bgcolor="#345491"> 
                  <td colspan="3"><img src="images/gif/pix.gif" width="1" height="1"></td>
                </tr> 
				
				<tr align="left"> 
				
				   <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("Public.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span> Public cible: </td>
                  <td height="25" width="5">:</td>
				  
	
                  <td height="0" class="required_info"><textarea name="public_cible"  cols="43" rows="2"  id="public_cible"  class="required" title="Veuillez entrer le public SVP!!" ></textarea></td>
                </tr>
				
				<tr align="left"> 
               <td height="25"> 
                    Objectifs de la formation:</td>
                  <td width="5" height="0">&nbsp;</td>
                  <td height="0" class="required_info"><textarea name="objectif" cols="43" rows="2" id="objectif"  class="required"  title="Veuillez entrer l'objectif SVP!!"></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Profil du m&eacute;tier vis&eacute; par la formation :</td>
                  <td height="25">:</td>
                  <td height="25" class="required_info"><textarea name="discipline" cols="43" rows="2" id="discipline" class="required" title="Veuillez entrer le profil vis&eacute; SVP!!"></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Contexte du projet :</td>
                  <td height="25">:</td>
                  <td height="25" class="required_info"><textarea name="description" cols="43" rows="2" id="description" class="required" title="Veuillez entrer le contexte SVP!!"></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &acute; distance ?</td>
                  <td height="25">:</td>
                  <td height="25" ><textarea name="cause" cols="43" rows="2" id="cause"  title="Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &acute; distance ?"></textarea></td>
                </tr>
				
				
			<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>
				  Cette formation, est-elle dispens&eacute;e en pr&eacute;sentiel dans votre &eacute;tablissement ou dans d'autres &eacute;tablissements universitaires? </td>
                  <td height="25">:</td>
                  <td height="25" >
					<div>Oui<input type="radio" class="inforadio" id="oui" name="depense" value="1" label="Oui" onclick="$('depense_etablissementv').show()"  />
					<span id="depense_etablissementv" style="display:none">
						Si Oui pr&eacute;cisez l'intitul&eacute; et l'&eacute;tablissement  habilit&eacute; 
						<textarea id="depense_etablissement" rows="2" cols="43" name="depense_etablissement" value="" ></textarea>
						</span>
					</div>
					<div> Non<input type="radio" id="non"  class="inforadio"  name="depense" value="0" label="Non" onclick="$('depense_etablissementv').hide()" /></div>
				  </td>
				  
                </tr>
				
				
				
				
				
				
				
               
                <tr align="left"> 
                  <td height="25">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25">
                
				   <input name="add_unite" type="hidden" id="modif_unite" value="OK" />
				  <input name="id_ue" type="hidden" id="id_ue" value="<? echo $_GET['id_ue']; ?>" />

                  </td>
                </tr>
                <tr> 
                  <td height="25" align="left">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25" align="left"> <input type="reset" name="Submit22" value="R&eacute;tablir" class="button" /> 
                    <input type="submit" name="Submit3" value="valider" class="button" />
					
					
					                  </td>
                </tr>
              </table>
            </form>
       <script type="text/javascript">
		 var valid2 = new Validation('cours', {useTitles:true});
	  </script>
      </td>
    </tr>
    <tr>
	
      
    <td align="left">&nbsp;</td>
    </tr>
  </table>
  </td>
    </tr>
</table>
<!--/td></tr>
</table-->





















<?php

} 
  
 if(!empty($_POST["modif_unite"]))
    {
	  
 
	 $ue_tab["titre"]               =   "";//$_POST[""];
	 
	 $ue_tab["public_cible"]        =   trim($_POST["public_cible"]);
	 $ue_tab["objectif"]            =    trim($_POST["objectif"]);
     $ue_tab["discipline"]          =    trim($_POST["discipline"]);
     $ue_tab["description"]         =    trim($_POST["description"]);
     $ue_tab["cause"]         		=    trim($_POST["cause"]);
	 $ue_tab["depense"]         	=    trim($_POST["depense"]);
	 
	 $ue_tab["date_creation"]       =   date('a-m-d');//$_POST[""];
     
	 if($_POST['depense']=='1')
	 {
	 	 $ue_tab["depense_etablissement"]  =   trim($_POST["depense_etablissement"]);
	 }
	 else
	  $ue_tab["depense_etablissement"] ="";
     
    
     
	 
	 
	  $ue_tab["nature"]              =   "";//$_POST[""];
	  $ue_tab["mots_cles"]           =   "";//$_POST[""];
		$ue_tab["code_ue"]     =$_POST['id_ue'];

	$res  = $unite->updateProjetIndexation($ue_tab);
	
	
	//die();
	
	
	
	// On actualise la page
	echo "<script language=\"JavaScript\"> document.location=\"modif_partenaire.php?id_ue=".$_POST['id_ue']."\"; </script>;";

	} 
	
	
	 if(!empty($_POST["add_unite"]))
    {
	  
 
	 $ue_tab["titre"]               =   "";//$_POST[""];
	 
	 $ue_tab["public_cible"]        =   trim($_POST["public_cible"]);
	 $ue_tab["objectif"]            =    trim($_POST["objectif"]);
     $ue_tab["discipline"]          =    trim($_POST["discipline"]);
     $ue_tab["description"]         =    trim($_POST["description"]);
     $ue_tab["cause"]         		=    trim($_POST["cause"]);
	 $ue_tab["depense"]         	=    trim($_POST["depense"]);
	 
	 $ue_tab["date_creation"]       =   date('a-m-d');//$_POST[""];
     
	 if($_POST['depense']=='1')
	 {
	 	 $ue_tab["depense_etablissement"]  =   trim($_POST["depense_etablissement"]);
	 }
	 else
	  $ue_tab["depense_etablissement"] ="";
     
    
      $ue_tab["nature"]              =   "";//$_POST[""];
	  $ue_tab["mots_cles"]           =   "";//$_POST[""];
	  $ue_tab["code_ue"]    		 =	 $_POST['id_ue'];

	  $ue_tab["nature"]              =   "";//$_POST[""];
	  $ue_tab["mots_cles"]           =   "";//$_POST[""];


	// Ajout de l'indexation
	$res  = $unite->projetAssignIndexation($ue_tab);
	
	
	
	//die();
	
	
	
	// On actualise la page
	echo "<script language=\"JavaScript\"> document.location=\"modif_partenaire.php?id_ue=".$_POST['id_ue']."\"; </script>;";

	} 

  
?>
</p>
</body>
</html>
